#pragma once
#include <vector>
#include <string>
#ifdef _LGVAG_COMPILER
extern size_t jump_tag;
#endif
class cmd_val
{
public:
    typedef enum { REGISTER, MEMORY, INTEGER, NONE }cmd_val_type;
    cmd_val_type op;
    unsigned regIdentity;
    int offset;
    cmd_val();
    cmd_val(cmd_val_type _op, unsigned reg, int offset);
};

class cmd_code {
public:
    cmd_code();
    typedef enum { MOV, ADD, SUB, PUSH, POP, CMP, JMP, JE, JNE, HLT, SETE, SETNE, SETL, SETG, SETLE, SETGE, MOVZBL, IMUL, MUL, IDIV, DIV, CLTD, FLAG, NOT, SAL, SAR, AND, OR, XOR }cctype;
    cctype op;
    cmd_val type1;
    cmd_val type2;
    cmd_code(cctype _op, cmd_val t1, cmd_val t2);
#ifdef _LGVAG_COMPILER
    void Dump() const;
#endif
};

